<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
?>
<div>
    <div>
        <?php $form = ActiveForm::begin(['enableClientValidation' => false, 'enableAjaxValidation' => true, 'options' => ['class' => 'form-validate']]); ?>
        <table width="100%" class="table-form">
            <tr>
                <th class="zx-goods-table">是否补课</th>
                <td><?= $form->field($model, 'is_makeup', ['template' => '{input}{error}{hint}'])->radioList([1=>'是',0=>'否'], ['style' => 'width:180px']) ?></td>
            </tr>
            <tr>
                <th class="zx-goods-table"><?= $model->attributeLabels()['remarks']; ?></th>
                <td><?= $form->field($model, 'remarks', ['template' => '{input}{error}{hint}'])->textarea(['style' => 'width:260px;height:50px']) ?></td>
            </tr>
        </table>
        <div class="zx-button-center" style="display: none">
            <?= Html::submitButton('提交', ['class' => "btn yx-next-step yx-radius5 button_step", 'id' => 'dosubmit']) ?>
        </div>
        <?php ActiveForm::end(); ?>
    </div>
</div>
<?php
$js = <<<JS
    $(document).on('change','input[name="GoodsPrice[is_activity]"]',function(){
         var vals = $(this).val();
         if(vals === '1'){
             $('#activity_box').css('display','');
         }else {
             $('#activity_box').css('display','none');
         }
    });
JS;
$this->registerJS($js);
?>